<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" />
		<link rel="stylesheet" href="${pageContext.request.contextPath }/css/Site.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath }/css/zy.all.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath }/css/font-awesome.min.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath }/css/amazeui.min.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath }/css/admin.css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath }/css/zy.menu.css" />
		<style>

		</style>

		<body>
			<div class="dvcontent">

				<div>
					<!--tab start-->
					<div class="tabs">
						<div class="hd">
							<ul style="">
								<li style="box-sizing: initial;-webkit-box-sizing: initial;" class="on">出库订单信息修改</li>
							</ul>
						</div>
						<div class="bd">
							<ul class="theme-popbod dform" style="display: none;">
									<!-- content start -->

									<div class="am-cf admin-main" style="padding-top: 0px;">
										<!-- content start -->
										<div class="admin-content">
											<div class="admin-content-body">

												<div class="am-g">
													<div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">

													</div>
													<div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4" style="padding-top: 30px;">
														<form class="am-form am-form-horizontal" action="${pageContext.request.contextPath }/orders/update" method="post">
															<input type="hidden" name="status" value="未收货">
															<input type="hidden" name="expenses" value="${orders.expenses }">
															<input type="hidden" name="ordertime" value="${orders.ordertime }">
															<div class="am-form-group">
																<label for="name" class="am-u-sm-3 am-form-label">出库单编号</label>
																<div class="am-u-sm-9">
																	<input type="text" required placeholder="出库单编号" name="orders_id" value="${orders.orders_id }" readonly="readonly"></td>
																</div>
															</div>
															
															<div class="am-form-group">
																<label for="name" class="am-u-sm-3 am-form-label">买家编号</label>
																<div class="am-u-sm-9">
																	<select name="buyer_id" id="sel_buyer">
																		<option value="${orders.buyer_id }">${orders.buyer_id }</option>
																		<c:forEach var="buyer" items="${list_buyer }">
																			<option value="${buyer.buyer_id }">${buyer.buyer_id }</option>
																		</c:forEach>
																	</select>
																</div>
															</div>
															
															<div class="am-form-group">
																<label for="name" class="am-u-sm-3 am-form-label">商品编号</label>
																<div class="am-u-sm-9">
																	<select name="sku_id" id="sel_sku">
																		<option value="${orders.sku_id }">${orders.sku_id }</option>
																		<c:forEach var="sku" items="${list_sku }">
																			<option value="${sku.sku_id }">${sku.sku_id }</option>
																		</c:forEach>
																	</select>
																</div>
															</div>
															
															<div class="am-form-group">
																<label for="name" class="am-u-sm-3 am-form-label">库位编号</label>
																<div class="am-u-sm-9">
																	<select name="loc_id" id="sel_loc">
																		<option value="${orders.loc_id }">${orders.loc_id }</option>
																		<c:forEach var="loc" items="${list_loc }">
																			<option value="${loc.loc_id }">${loc.loc_id }</option>
																		</c:forEach>
																	</select>
																</div>
															</div>
															
															
															<div class="am-form-group">
																<label for="name" class="am-u-sm-3 am-form-label">入库数量</label>
																<div class="am-u-sm-9">
																	<input type="text"  required placeholder="入库数量" name="quantity" value="${orders.quantity }">
																</div>
															</div>
															
															
															
															<div class="am-form-group">
																<label for="name" class="am-u-sm-3 am-form-label">备注</label>
																<div class="am-u-sm-9">
																	<input type="text"  required placeholder="备注" name="comment" value="${orders.comment }">
																</div>
															</div>
															
															
															<div class="am-form-group">
																<div class="am-u-sm-9 am-u-sm-push-3">
																	<input type="submit"  class="am-btn am-btn-success" value="修改" onclick="return check();"/>
																	<input type="button"  class="am-btn am-btn-success" value="返回" onclick="window.location='${pageContext.request.contextPath }/orders/findAll'"/>
																</div>
															</div>
														</form>
													</div>
												</div>
											</div>

										</div>
										<!-- content end -->
									</div>
									<!-- end-->
							</ul>
							</div>
						</div>
						<!--tab end-->

					</div>

					<script src="${pageContext.request.contextPath }/js/jquery-1.7.2.min.js" type="text/javascript"></script>
					<script src="${pageContext.request.contextPath }/js/plugs/Jqueryplugs.js" type="text/javascript"></script>
					<script src="${pageContext.request.contextPath }/js/_layout.js"></script>
					<script src="${pageContext.request.contextPath }/js/plugs/jquery.SuperSlide.source.js"></script>
					
					<script>
						var num = 1;
						$(function() {

							$(".tabs").slide({
								trigger: "click"
							});

						});

					</script>
					<script type="text/javascript">function check() {
						var sel_type = document.getElementById('sel_type');
						
						 if(sel_type.value == 0) {
							alert("请选择库位类型");
							return false;
						}
						 else {
							return true;
						} 
						
		             }</script>
					
				</div>
		</body>

</html>